import Vue from 'vue'
import Vuex from 'vuex'
import persistedState from 'vuex-persistedstate';// vuex持久化存储
Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [
    persistedState({ storage: window.sessionStorage })
  ],
  state: {
    userData: {}
  },
  mutations: {
    setUserData(state, data) {
      state.userData = data;
    }
  },
  actions: {
  },
  modules: {
  }
})
